body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: transparent;
}

#toolbar {
  height: 60px;
  background-color: rgba(50, 50, 50, 0.9);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-app-region: drag; /* 使整个区域可拖拽 */
  border-radius: 0 0 10px 10px; /* 底部圆角 */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 添加拖动提示 */
#toolbar::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, #4caf50, #2196f3);
  opacity: 0;
  transition: opacity 0.3s;
}

#toolbar:hover::before {
  opacity: 1;
}

#close-btn {
  position: absolute;
  right: 15px;
  top: 15px;
  width: 30px;
  height: 30px;
  background-color: rgba(255, 100, 100, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-app-region: no-drag;
  transition: background-color 0.2s;
}

#close-btn:hover {
  background-color: rgba(255, 50, 50, 1);
}

#close-btn::before,
#close-btn::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 2px;
  background-color: white;
}

#close-btn::before {
  transform: rotate(45deg);
}

#close-btn::after {
  transform: rotate(-45deg);
}

#status-indicator {
  position: absolute;
  left: 15px;
  top: 25px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #4caf50;
  animation: pulse 2s infinite;
  -webkit-app-region: no-drag;
  z-index: 2;
  pointer-events: none;
}

@keyframes pulse {
  0% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.5;
  }
}

#items-container {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  flex-grow: 1;
  -webkit-app-region: no-drag;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 5px;
}

#items-container {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  flex-grow: 1;
  -webkit-app-region: no-drag;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 5px;
  margin: 0 40px;
  scroll-behavior: smooth;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 5%,
    black 95%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 5%,
    black 95%,
    transparent
  );
}

#items-container::-webkit-scrollbar {
  height: 4px;
  background: transparent;
}

#items-container::-webkit-scrollbar-track {
  background: transparent;
  margin: 0 40px;
}

#items-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  transition: background-color 0.3s;
}

#items-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

#items-container:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.4);
}

.folder-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  -webkit-app-region: no-drag;
  min-width: 40px;
  padding: 4px;
  border-radius: 6px;
  transition: background-color 0.2s, transform 0.2s;
}

.folder-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.folder-item:active,
.folder-item.active {
  transform: translateY(0);
}

.folder-box {
  width: 30px;
  height: 30px;
  background-color: white;
  border-radius: 4px;
  margin-bottom: 2px;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  cursor: pointer;
}

.folder-item:hover .folder-box {
  transform: scale(1.05);
  background-color: #f0f0f0;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.folder-box:active {
  transform: scale(0.95) !important;
  background-color: #e0e0e0;
}

/* VSCode图标提示 */
.folder-box::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 12px;
  height: 12px;
  background-color: #0078d4;
  mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M23.15 2.587L18.21.21a1.494 1.494 0 0 0-1.705.29l-9.46 8.63-4.12-3.128a.999.999 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12 .326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a.999.999 0 0 0 1.276.057l4.12-3.128 9.46 8.63a1.492 1.492 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352zm-5.146 14.861L10.826 12l7.178-5.448v10.896z"/></svg>');
  -webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M23.15 2.587L18.21.21a1.494 1.494 0 0 0-1.705.29l-9.46 8.63-4.12-3.128a.999.999 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12 .326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a.999.999 0 0 0 1.276.057l4.12-3.128 9.46 8.63a1.492 1.492 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352zm-5.146 14.861L10.826 12l7.178-5.448v10.896z"/></svg>');
  mask-size: cover;
  -webkit-mask-size: cover;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s;
  border-radius: 2px;
}

.folder-item:hover .folder-box::after {
  opacity: 1;
  transform: scale(1);
}

.folder-box.clicking {
  transform: scale(0.92);
  background-color: #e0e0e0;
  transition: all 0.1s;
}

.folder-box.clicking::after {
  transform: scale(0.9);
  opacity: 0.8;
}

/* 添加点击涟漪效果 */
@keyframes ripple {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.folder-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 120, 212, 0.2);
  border-radius: 4px;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.folder-box.clicking::before {
  animation: ripple 0.6s ease-out;
}

/* VSCode tooltip 样式 */
.vscode-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  transition: opacity 0.2s ease;
  opacity: 0;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  z-index: 1000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

.vscode-tooltip::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 4px 4px 4px 0;
  border-color: transparent rgba(0, 0, 0, 0.8) transparent transparent;
}

/* Tooltip 样式增强 */
.vscode-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  transition: all 0.2s ease;
  opacity: 0;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  z-index: 1000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.vscode-tooltip::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  border-style: solid;
  border-width: 4px 4px 4px 0;
  border-color: transparent rgba(0, 0, 0, 0.8) transparent transparent;
  transition: all 0.2s ease;
}

/* 左侧显示的tooltip样式 */
.tooltip-left.vscode-tooltip::before {
  left: auto;
  right: -4px;
  border-width: 4px 0 4px 4px;
  border-color: transparent transparent transparent rgba(0, 0, 0, 0.8);
}

/* 键盘焦点样式 */
.folder-box:focus {
  outline: none;
}

.folder-box:focus-visible {
  outline: 2px solid #0078d4;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0, 120, 212, 0.1);
}

/* 动画优化 */
.folder-box {
  will-change: transform, background-color, box-shadow;
}

.vscode-tooltip {
  will-change: opacity, transform;
}

/* 确保tooltip不会超出视口的响应式调整 */
@media (max-width: 768px) {
  .vscode-tooltip {
    font-size: 11px;
    padding: 3px 6px;
  }
}

/* 高对比度模式支持 */
@media (forced-colors: active) {
  .folder-box:focus-visible {
    outline: 2px solid CanvasText;
  }

  .vscode-tooltip {
    background: Canvas;
    color: CanvasText;
    border: 1px solid CanvasText;
  }
}

.folder-name {
  font-size: 10px;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  color: white;
  transition: opacity 0.2s;
  opacity: 0.8;
}

.folder-item:hover .folder-name {
  opacity: 1;
}

/* 设置按钮样式 */
#settings-btn {
  position: absolute;
  right: 55px;
  top: 15px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.2s;
  -webkit-app-region: no-drag;
}

#settings-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

#settings-btn:active {
  background-color: rgba(255, 255, 255, 0.2);
}

/* 设置面板样式 */
.settings-panel {
  position: absolute;
  top: 65px;
  right: 15px;
  background-color: rgba(50, 50, 50, 0.95);
  color: white;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  min-width: 200px;
  display: none;
  animation: fadeIn 0.2s ease-out;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.settings-panel h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: normal;
  opacity: 0.9;
}

.settings-option {
  margin: 8px 0;
}

.settings-option label {
  display: flex;
  align-items: center;
  font-size: 13px;
  cursor: pointer;
}

.settings-option input[type="radio"] {
  margin-right: 8px;
}